<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="Access-Control-Allow-Origin" content="*">
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>选择图片</title>
    <script src="/static/resource/js/jquery.min.js"></script>
    <link href="/static/resource/album/css/reset.css" rel="stylesheet" />
    <link href="/static/resource/album/css/model.css" rel="stylesheet" />
    <script src="/static/resource/album/js/jquery.min.js"></script>
    <script src="/static/resource/album/js/rem.min.js"></script>
    <link  href="http://liyi.xibeidev.com:877/resource/valentine/css/cropper.css" rel="stylesheet">
    <link  href="http://static.zhenxuan.xibei.com.cn/public/static/home/js/layer_mobile/need/layer.css?2.0" rel="stylesheet">
    <script src="http://liyi.xibeidev.com:877/resource/valentine/js/cropper.js"></script>
    <script src="http://static.zhenxuan.xibei.com.cn/public/static/home/js/layer_mobile/layer.js"></script>
</head>
<body>
<style type="text/css">
    .file_up input{
        margin-top: 50px;
    }
</style>

<div class="wrap">
    <div class="img-title"></div>
    <!--<div class="img-photoFrame" style="background: url("img.sccnn.com/bimg/337/31452.jpg")"></div>-->
    <img src="{$img_url}" alt="">
    <input class="btn-upload" type="button" value="上传照片" id="selectImg" />
</div>
<form action="" method="post" enctype="multipart/form-data" class="file_up">
    <input type="file" id="select" name="images" style="display: none;"/>
</form>
<script>
    //图片选择 触发的事件
    $("#selectImg").click(function(){
        $('#select').click();
    })
    $("#select").change(function(){
        if(!this.files || !this.files[0]){
            return;
        }
        $(".file_up").submit()
    })

</script>
</body>
</html>